jQuery(document).ready(function($){
    
    $('.link-painel-user').popover({
        trigger:'hover',
        'placement':'bottom',
        html:true
    });

    $('[role="tooltip-bal"],a,[add="tooltip"]').tooltip();
    


    $('.display-box-message').delay(2000).slideUp();
    
    $('a[role="passwordChange"]').on('click',function(){
        
        var markup = '<div class="col-xs-2"><label class="">Senha</label></div>'
                     +'<div class="col-xs-3"><input type="password" name="password" placeholder="digite a nova senha" class="form-control"/></div>';
             
       var is_show = $('.box-display-input-passwords').attr('is_show');      
       
       if(!is_show || is_show === false || is_show == 'false'){
            $('.box-display-input-passwords').html(markup).attr('is_show',true).slideDown();
       }else{
            $('.box-display-input-passwords').attr('is_show',false).slideUp(500,function(){$(this).html('')}); 
       }
       
    });
    


var tabUserLoaded = $.Storage.loadItem('userPageTabs');

  
  $('.user-painel .nav-tabs').on('click.storageUser','a',function(){

               $.Storage.saveItem('userPageTabs',$(this).attr('href'));                        

  });
   

   if(tabUserLoaded != false){  $('a[href="'+tabUserLoaded+'"]').trigger('click');}


   $('a[role="detailsUserLeilao"]').on('click',function(e){
            e.preventDefault();
            var id = $(this).attr('data-id');

            $('.lote-header.line-'+id).slideToggle({duration:400,
                                                    done:function(prom,idn){
                                                       
                                                    }});

   });
    
});